<?php
class IndexAction extends CommonAction {
	
	// 框架首页
	public function Index() {
		$this->Verifylogin();
		$menu = $this->smenu();
		//print_r($menu);
		if (isset ( $_SESSION [C ( 'USER_AUTH_KEY' )] )) {
            //显示菜单项
            $menu  = array();
            if(isset($_SESSION['menus'.$_SESSION[C('USER_AUTH_KEY')]])) {

                //如果已经缓存，直接读取缓存
                $menu = $_SESSION['menus'.$_SESSION[C('USER_AUTH_KEY')]];
            }else {
				$menu = $this->menus();
            }
            if(!empty($_GET['tag'])){
                $this->assign('menuTag',$_GET['tag']);
            }
            $this->assign('menus',$menu);
		}
		//print_r($menu);
		C ( 'SHOW_RUN_TIME', false ); // 运行时间显示
		C ( 'SHOW_PAGE_TRACE', false );
		$this->display ();
	}
}
?>